\subsection{$<$avr/io.h$>$: AVR device-\/specific IO definitions}
\label{group__avr__io}\index{$<$avr/io.h$>$: AVR device-\/specific IO definitions@{$<$avr/io.h$>$: AVR device-\/specific IO definitions}}

\begin{DoxyCode}
 #include <avr/io.h> 
\end{DoxyCode}


This header file includes the apropriate IO definitions for the device that has been specified by the {\ttfamily -\/mmcu=} compiler command-\/line switch. This is done by diverting to the appropriate file {\ttfamily $<$avr/io}{\itshape XXXX\/}{\ttfamily .h$>$} which should never be included directly. Some register names common to all AVR devices are defined directly within {\ttfamily $<$avr/common.h$>$}, which is included in {\ttfamily $<$avr/io.h$>$}, but most of the details come from the respective include file.

Note that this file always includes the following files: 
\begin{DoxyCode}
    #include <avr/sfr_defs.h>
    #include <avr/portpins.h>
    #include <avr/common.h>
    #include <avr/version.h>
\end{DoxyCode}
 See avr\_\-sfr for more details about that header file.

Included are definitions of the IO register set and their respective bit values as specified in the Atmel documentation. Note that inconsistencies in naming conventions, so even identical functions sometimes get different names on different devices.

Also included are the specific names useable for interrupt function definitions as documented here.

Finally, the following macros are defined:


\begin{DoxyItemize}
\item {\bfseries RAMEND} \par
 The last on-\/chip RAM address. \par

\item {\bfseries XRAMEND} \par
 The last possible RAM location that is addressable. This is equal to RAMEND for devices that do not allow for external RAM. For devices that allow external RAM, this will be larger than RAMEND. \par

\item {\bfseries E2END} \par
 The last EEPROM address. \par

\item {\bfseries FLASHEND} \par
 The last byte address in the Flash program space. \par

\item {\bfseries SPM\_\-PAGESIZE} \par
 For devices with bootloader support, the flash pagesize (in bytes) to be used for the {\ttfamily SPM} instruction.
\item {\bfseries E2PAGESIZE} \par
 The size of the EEPROM page. 
\end{DoxyItemize}